package com.dau.entity.customer;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dau.entity.BaseEntity;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.bind.DefaultValue;

import java.io.Serial;
import java.math.BigDecimal;

@TableName("customer_order_item")
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class ItemInfo extends BaseEntity {
    /**
     * 订单id
     */
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "item_id")
    private Long itemId;
    /**
     * 订单id
     */
    private Long orderId;
    /**
     * 订单代码
     */
    private String itemCode;
    /**
     * 订单代码
     */
    private String orderCode;
    /**
     * 货物id
     */
    @NotNull(message = "商品id不能为空")
    private Long goodsId;
    /**
     * 货物代码
     */
    private String goodsCode;
    /**
     * 商品价格
     */
    private BigDecimal goodsPrice;
    /**
     * 货物数量
     */
    @NotNull(message = "商品数量不能为空")
    private Integer goodsNum;
    /**
     * 货物总计
     */
    private BigDecimal goodsTotal;
    /**
     * 客户id
     */
    private Long customerId;
    /**
     * 客户名称
     */
    private String customerName;
    /**
     * 客户vx id
     */
    private String customerVxId;
    /**
     * 优惠券id
     */
    private String couponId;
    /**
     * 优惠券金额
     */
    private BigDecimal couponAmount = BigDecimal.ZERO;
    /**
     * 优惠券类型
     */
    private String couponType;
}
